import logging.config

# '读取日志配置文件'
logging.config.fileConfig("C:/Users/ldy/PycharmProjects/ceshi/venv/Include/logging.conf")

# 创建一个日志器logger
logger = logging.getLogger('fileAndConsole')
logger.debug('debug')
logger.info('info')
logger.warning('warn')
logger.error('error')
logger.critical('critical')